<!DOCTYPE html>
<html>
	<head>
		<title>微信登录</title>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0,viewport-fit=cover" />
		<link href="https://res.wx.qq.com/a/wx_fed/assets/res/NTI4MWU5.ico" rel="Shortcut Icon" />

		<!-- iframe & 客户端嵌入 -->
		<!--style-->

		<!-- 独立页面 -->
		<!-- 由于文件打包问题，暂时无法按需引入css，所以需要指定独立的命名空间
      页面-独立页面：.web_qrcode_type_page_self
      页面-webview内嵌：.web_qrcode_type_page_embedded
      iframe：.web_qrcode_type_iframe
    -->
		<link rel="stylesheet" href="https://res.wx.qq.com/t/wx_fed/weui-source/res/2.5.4/weui.min.css" />
		<!--style-->
		<!--[if IE]>
			<style>
				.web_qrcode_type_page_self .web_qrcode_tips_logo {
					background-image: url('');
				}
				.web_qrcode_type_page_self .web_qrcode_app {
					vertical-align: middle;
					margin-top: -0.2em;
				}
				.web_qrcode_type_page_self .web_qrcode_msg_icon_success {
					background-image: url('');
				}
				.web_qrcode_type_page_self .web_qrcode_msg_icon_error {
					background-image: url('');
				}
			</style>
		<![endif]-->

		<link rel="stylesheet" href="//res.wx.qq.com/t/wx_fed/mp/connect/res/static/css/eb891745f5ce5971ec7c64dfb6f37c09.css" />
	</head>
	<body>
		<!-- 独立页面 -->
		<div id="tpl_for_page" class="web_qrcode_area" style="display: none">
			<span class="web_qrcode_wrp">
				<!-- 默认 -->
				<div class="js_status js_wx_default_tip" id="wx_default_tip">
					<div class="web_qrcode_tips">
						<i class="web_qrcode_tips_logo"></i>
						使用微信扫一扫登录
					</div>
					<div class="web_qrcode_app_wrp">
						「
						<strong class="web_qrcode_app">三星堆统一认证平台</strong>
						」
					</div>
					<img class="web_qrcode_img" src="/connect/qrcode/021lZy3u1IGVll20" />
				</div>

				<!-- 扫码成功 -->
				<div class="js_status js_wx_after_scan" style="display: none" id="wx_after_scan">
					<i class="web_qrcode_msg_icon web_qrcode_msg_icon_success"></i>
					<h1 class="web_qrcode_msg_title">扫描成功</h1>
					<p class="web_qrcode_msg_desc">在微信中轻触允许即可登录</p>
				</div>

				<!-- 取消登录 -->
				<div class="js_status js_wx_after_cancel" style="display: none" id="wx_after_cancel">
					<i class="web_qrcode_msg_icon web_qrcode_msg_icon_error"></i>
					<h1 class="web_qrcode_msg_title">你已取消此次登录</h1>
					<div class="web_qrcode_msg_opr">
						<a href="javascript:;" class="weui-btn weui-btn_primary" id="js_web_qrcode_reload">重试</a>
					</div>
				</div>
			</span>
			<span class="weui-vertical-helper"></span>
		</div>

		<!-- iframe、内嵌webview -->
		<div id="tpl_for_iframe" class="old-template" style="display: none">
			<div class="main impowerBox">
				<div class="loginPanel normalPanel">
					<div class="title">微信登录</div>
					<div class="waiting panelContent">
						<div class="wrp_code"><img class="qrcode lightBorder" src="/connect/qrcode/021lZy3u1IGVll20" /></div>
						<div class="info">
							<div class="status status_browser js_status js_wx_default_tip" id="wx_default_tip">
								<p>使用微信扫一扫登录</p>
								<p>“三星堆统一认证平台”</p>
							</div>
							<div class="status status_succ js_status js_wx_after_scan" style="display: none" id="wx_after_scan">
								<i class="status_icon icon38_msg succ"></i>
								<div class="status_txt">
									<h4>扫描成功</h4>
									<p>在微信中轻触允许即可登录</p>
								</div>
							</div>
							<div class="status status_fail js_status js_wx_after_cancel" style="display: none" id="wx_after_cancel">
								<i class="status_icon icon38_msg warn"></i>
								<div class="status_txt">
									<h4>你已取消此次登录</h4>
									<p>你可再次扫描登录，或关闭窗口</p>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>

		<script src="https://res.wx.qq.com/t/wx_fed/cdn_libs/res/jquery/1.11.3/jquery.min.js"></script>
		<script>
			// @cunjin 下面的变量是给开发者工具用的，inline到html里面，一定不能删掉
			var fordevtool = 'https://long.open.weixin.qq.com/connect/l/qrconnect?uuid=021lZy3u1IGVll20';
			// console.log('devtool use', fordevtool)
		</script>
		<script>
			var usenewdomain = '1' * 1 || 0;
		</script>
		<!--script-->
		<!--script-->
		<script>
			!(function (e) {
				function t(o) {
					if (n[o]) return n[o].exports;
					var c = (n[o] = { exports: {}, id: o, loaded: !1 });
					return e[o].call(c.exports, c, c.exports, t), (c.loaded = !0), c.exports;
				}
				var n = {};
				return (t.m = e), (t.c = n), (t.p = '//res.wx.qq.com/t/wx_fed/mp/connect/res'), t(0);
			})([
				function (e, t, n) {
					e.exports = n(9) + n(10);
				},
				,
				,
				function (e, t) {},
				,
				,
				,
				function (e, t) {},
				,
				function (e, t) {
					function n(e, t) {
						for (var n = new Array(), o = 0; o < e.length; o++)
							if ('&' == e.charAt(o)) {
								var c = [3, 4, 5, 9],
									r = 0;
								for (var s in c) {
									var A = c[s];
									if (o + A <= e.length) {
										var a = e.substr(o, A).toLowerCase();
										if (t[a]) {
											n.push(t[a]), (o = o + A - 1), (r = 1);
											break;
										}
									}
								}
								0 == r && n.push(e.charAt(o));
							} else n.push(e.charAt(o));
						return n.join('');
					}
					function o() {
						for (var e = new Object(), t = '\'"<>`script:daex/hml;bs64,', o = 0; o < t.length; o++) {
							for (var c = t.charAt(o), r = c.charCodeAt(), s = r, A = r.toString(16), a = 0; a < 7 - r.toString().length; a++)
								s = '0' + s;
							(e['&#' + r + ';'] = c), (e['&#' + s] = c), (e['&#x' + A] = c);
						}
						(e['&lt'] = '<'), (e['&gt'] = '>'), (e['&quot'] = '"');
						var i = location.href,
							l = document.referrer;
						(i = decodeURIComponent(n(i, e))), (l = decodeURIComponent(n(l, e)));
						var d = new RegExp('[\'"<>`]|script:|data:text/html;base64,');
						if (d.test(i) || d.test(l)) {
							var p = '1.3',
								u = 'http://zyjc.sec.qq.com/dom',
								m = new Image();
							(m.src = u + '?v=' + p + '&u=' + encodeURIComponent(i) + '&r=' + encodeURIComponent(l)),
								(i = i.replace(/['\"<>`]|script:/gi, '')),
								(i = i.replace(/data:text\/html;base64,/gi, 'data:text/plain;base64,')),
								(location.href = i);
						}
					}
					o();
				},
				function (e, t) {
					!(function () {
						function e(e) {
							var t = document.location.search || document.location.hash;
							if (t) {
								if ((/\?/.test(t) && (t = t.split('?')[1]), null == e)) return decodeURIComponent(t);
								for (var n = t.split('&'), o = 0; o < n.length; o++)
									if (n[o].substring(0, n[o].indexOf('=')) == e) return decodeURIComponent(n[o].substring(n[o].indexOf('=') + 1));
							}
							return '';
						}
						function t(e, t) {
							t || (t = window.location.href), (e = e.replace(/[\[\]]/g, '\\</body>'));
							var n = new RegExp('[?&]' + e + '(=([^&#]*)|&|#|$)'),
								o = n.exec(t);
							return o ? (o[2] ? decodeURIComponent(o[2].replace(/\+/g, ' ')) : '') : null;
						}
						function n(e) {
							var t = document.location.search || document.location.hash;
							if (t) {
								if (('?' === t[0] && (t = t.slice(1)), null === e)) return decodeURIComponent(t);
								for (var n = t.split('&'), o = 0, c = n.length; o < c; o++) {
									var r = n[o].split('=');
									if (r[0] === e) return !0;
								}
							}
							return !1;
						}
						function o(e, t) {
							Math.random() >= 1 - (Number(t) || 0.1) &&
								(new Image().src =
									'https://support.weixin.qq.com/cgi-bin/mmsupportmeshnodelogicsvr-bin/cube?biz=3512&label=connect.qrconnect&action=' +
									e);
						}
						function c(e, t, n) {
							var o = '';
							if (n) {
								var c = new Date();
								c.setTime(c.getTime() + 24 * n * 60 * 60 * 1e3), (o = '; expires=' + c.toUTCString());
							}
							document.cookie = encodeURIComponent(e) + '=' + encodeURIComponent(t) + o + '; path=/; SameSite=None; Secure';
						}
						function r(e) {
							for (var t = encodeURIComponent(e) + '=', n = document.cookie.split(';'), o = 0; o < n.length; o++) {
								for (var c = n[o]; ' ' === c.charAt(0); ) c = c.substring(1);
								if (0 === c.indexOf(t)) return decodeURIComponent(c.substring(t.length));
							}
							return null;
						}
						function s(e) {
							var t = r(e);
							if (t) {
								var n = new Date(0).toUTCString();
								document.cookie = encodeURIComponent(e) + '=; expires=' + n + '; path=/';
							}
						}
						function A(e) {
							console.log('report reloadcount: ', e),
								jQuery.ajax({
									type: 'GET',
									url: 'https://open.weixin.qq.com/sdk/report?' + (e ? 'reloadCount=' + e : ''),
									cache: !1,
									success: function (e) {
										o('connect_qrconnect_longpull_success_402_reload_succ', 0.01);
									},
									error: function (e, t, n) {
										o('connect_qrconnect_longpull_success_402_reload_err', 0.01);
									}
								});
						}
						function a() {
							var e = r('reloadTriggered'),
								t = parseInt(r('reloadCount'), 10) || 0;
							e ? (A(++t), c('reloadCount', t, 100)) : c('reloadCount', 0, 100), s('reloadTriggered');
						}
						function i(e) {
							jQuery.ajax({
								type: 'GET',
								url: v + '/connect/l/qrconnect?uuid=021lZy3u1IGVll20' + (e ? '&last=' + e : ''),
								dataType: 'script',
								cache: !1,
								timeout: 6e4,
								success: function (e, n, r) {
									o('connect_qrconnect_longpull_success', 0.01);
									var s = window.wx_errcode;
									switch (s) {
										case 405:
											o('connect_qrconnect_longpull_success_405', 0.01);
											var A = 'https://www.sxd.cn/login?type=1';
											(A = A.replace(/&amp;/g, '&')),
												(A += (A.indexOf('?') > -1 ? '&' : '?') + 'code=' + wx_code + '&state=0015236178');
											var a = t('self_redirect');
											if (d)
												if ('true' !== a && 'false' !== a)
													try {
														document.domain = 'qq.com';
														var l = window.top.location.host.toLowerCase();
														l && (window.location = A);
													} catch (e) {
														window.top.location = A;
													}
												else if ('true' === a)
													try {
														window.location = A;
													} catch (e) {
														window.top.location = A;
													}
												else window.top.location = A;
											else window.location = A;
											break;
										case 404:
											o('connect_qrconnect_longpull_success_404', 0.01),
												jQuery('.js_status').hide(),
												jQuery('.js_qr_img').hide(),
												jQuery('.js_wx_after_scan').show(),
												setTimeout(i, 100, s);
											break;
										case 403:
											o('connect_qrconnect_longpull_success_403', 0.01),
												jQuery('.js_status').hide(),
												jQuery('.js_qr_img').hide(),
												jQuery('.js_wx_after_cancel').show(),
												setTimeout(i, 2e3, s);
											break;
										case 402:
											o('connect_qrconnect_longpull_success_402', 0.01),
												c('reloadTriggered', !0, 100),
												setTimeout(function () {
													window.location.reload();
												}, 200);
											break;
										case 500:
											o('connect_qrconnect_longpull_success_500', 0.01),
												setTimeout(function () {
													window.location.reload();
												}, 200);
											break;
										case 408:
											o('connect_qrconnect_longpull_success_408', 0.01), setTimeout(i, 2e3);
											break;
										default:
											o('connect_qrconnect_longpull_success_others', 0.01);
									}
								},
								error: function (e, t, n) {
									o('connect_qrconnect_longpull_error', 0.01);
									var c = window.wx_errcode;
									408 == c
										? (o('connect_qrconnect_longpull_error_408', 0.01), setTimeout(i, 5e3))
										: (o('connect_qrconnect_longpull_error_others', 0.01), setTimeout(i, 5e3, c));
								}
							});
						}
						function l() {
							var e = jQuery.Deferred();
							return (
								setTimeout(function () {
									e.resolve();
								}, 1e3),
								jQuery(window).load(function () {
									e.resolve();
								}),
								e.promise()
							);
						}
						jQuery('#js_web_qrcode_reload').click(function () {
							location.reload();
						});
						var d = window.top != window,
							p = n('self_redirect') || n('style') || n('href') || n('oldstyle'),
							u = parseInt(e('styletype'), 10),
							m = NaN;
						1 !== u && 0 !== u && 1 === m && (u = 0);
						var g = '';
						if (1 !== u && 0 !== u && g) {
							o('connect_qrconnect_css_href');
							var w = document.createElement('link');
							(w.rel = 'stylesheet'),
								(w.href = g.replace(new RegExp('javascript:', 'gi'), '')),
								document.getElementsByTagName('head')[0].appendChild(w);
						}
						if (d) {
							o('connect_qrconnect_iframe'), (document.body.className += ' web_qrcode_type_iframe');
							var f = '';
							'white' != f && (document.body.style.color = '#373737'), jQuery('#tpl_for_iframe').show();
						} else {
							o('connect_qrconnect_page'),
								document.getElementsByClassName ||
									(document.getElementsByClassName = function (e) {
										for (
											var t = [],
												n = new RegExp('(^| )' + e + '( |$)'),
												o = document.getElementsByTagName('*'),
												c = 0,
												r = o.length;
											c < r;
											c++
										)
											n.test(o[c].className) && t.push(o[c]);
										return t;
									});
							for (var _ = document.getElementsByClassName('status'), h = 0, b = _.length; h < b; ++h) {
								var y = _[h];
								y.className = y.className + ' normal';
							}
							if (p)
								o('connect_qrconnect_page_embedded'),
									(document.body.className += ' web_qrcode_type_page_embedded'),
									(document.body.style.backgroundColor = '#333333'),
									(document.body.style.padding = '50px'),
									jQuery('#tpl_for_iframe').show();
							else {
								o('connect_qrconnect_page_self');
								var q = document.createElement('meta');
								(q.name = 'color-scheme'),
									(q.content = 'light dark'),
									document.getElementsByTagName('head')[0].appendChild(q),
									(document.body.className += ' web_qrcode_type_page_self'),
									jQuery('#tpl_for_page').show();
							}
						}
						var v = window.usenewdomain ? 'https://lp.open.weixin.qq.com' : 'https://long.open.weixin.qq.com';
						l().then(function () {
							a(), setTimeout(i, 1e3);
						});
					})();
				}
			]);
		</script>
	</body>
</html>
